/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gride.gui;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Toolkit;
import java.net.URL;
import java.util.Timer;
import java.util.TimerTask;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JWindow;

/**
 *
 * @author lukasz
 */
public class GrideSplashScreen extends JWindow
{

    // <editor-fold defaultstate="expanded" desc="Private Members">

    // </editor-fold>


    // <editor-fold defaultstate="expanded" desc="Constructors">

    /**
     * 
     */
    public GrideSplashScreen()
    {
        URL splashURL =
           getClass().getClassLoader().getResource("gride/gui/gridesplash.jpg");
        JLabel logo = new JLabel(new ImageIcon(splashURL));
        final JTextField label = new JTextField(" Starting Gride...");
        label.setEditable(false);
        label.setPreferredSize(new Dimension(200, 30));
        
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension labelSize = logo.getPreferredSize();
        setLocation(screenSize.width/2 - (labelSize.width/2),
                    screenSize.height/2 - (labelSize.height/2));

        getContentPane().add(logo, BorderLayout.CENTER);
        getContentPane().add(label, BorderLayout.SOUTH);

        pack();
        setVisible(true);
    }

    // </editor-fold>


    // <editor-fold defaultstate="expanded" desc="Getters/Setters">

    // </editor-fold>


    // <editor-fold defaultstate="expanded" desc="Public Methods">

    // </editor-fold>


    // <editor-fold defaultstate="expanded" desc="Private Methods">

    // </editor-fold>

}
